package com.mike.server.engine;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ServiceThreadPool {
	
	public static final int SERVICE_THREAD_CONUT = 10;
	
	private static ServiceThreadPool instance = new ServiceThreadPool();
	
	private static final ExecutorService servicesPool = Executors.newFixedThreadPool(SERVICE_THREAD_CONUT);
	
	private ServiceThreadPool() {
		//Don't allow new it outside.
	}
	
	public static ServiceThreadPool getInstance() {
		return instance;
	}
	
	public void exe(Runnable runnable) {
		servicesPool.execute(runnable);
	}
}
